<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html">
        The sales order below has been successfully saved into the system.<br/>
<h:form id="confirmNewSalesOrderForm">
            <h:outputText style="font-weight: bold" value="Sales Order Id: " />
            <h:outputText value="#{salesOrderBean.salesOrderId}">
            </h:outputText><br/>

            <h:outputText style="font-weight: bold" value="Date Ordered: " />
            <h:outputText value="#{salesOrderBean.dateOrdered}">
            </h:outputText><br/>

            <br/>
            <h:outputText style="font-weight: bold" value="Last Modified By: " />
            <h:outputText value="#{salesOrderBean.lastModifiedBy}">
            </h:outputText>
            
            <br/>
            <h:outputText style="font-weight: bold" value="Total Price: " />
            <h:outputText value="#{salesOrderBean.totalPrice}">
            </h:outputText>
            
            <br/>
            <h:outputText style="font-weight: bold" value="Based on Purchase Order id" />
            <h:outputText value="#{salesOrderBean.purchaseOrderId}">
            </h:outputText>
            
            <br/>
            <h:outputText style="font-weight: bold" value="Status: " />
            <h:outputText value="#{salesOrderBean.status}">
            </h:outputText><br/>

            <h:dataTable cellpadding="3px" cellspacing="6px" styleClass="allaroundborder" headerClass="allaroundborder" columnClasses="allaroundborder" 
                         rowClasses="allaroundborder" value="#{salesOrderBean.salesOrderItemList}" var="salesOrderItem">

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Sales Order Item Id" />
                    </f:facet>
                    <h:outputText value="#{salesOrderItem.id}" />
                </h:column>    

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Product Name" />
                    </f:facet>
                    <h:outputText value="#{salesOrderItem.productName}" />
                </h:column>    

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Quantity of Product" />
                    </f:facet>
                    <h:outputText value="#{salesOrderItem.numOfProduct}" />
                </h:column>    

                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Product Price" />
                    </f:facet>
                    <h:outputText value="#{salesOrderItem.productPrice}" />
                </h:column>
                
                <h:column>
                    <f:facet name="header">
                        <h:outputText value="Shipping Address" />
                    </f:facet>
                    <h:outputText value="#{salesOrderItem.shippingAddress}" />
                </h:column> 

            </h:dataTable><br/>
            <h:commandButton action="index.xhtml" value="Return to index" actionListener="#{salesOrderBean.resetAll}"/>
        </h:form>   
</ui:composition>